package com.albaba.designpattern.mediator.text_002;

/**
 * @Description: 具体的同事类、房屋的拥有者
 * @Author zx
 * @Date 2025/3/3 16:46
 * @Version 1.0
 */
public class HouseOwner extends Person{

    public HouseOwner(String name, Mediator mediator) {
        super(name, mediator);
    }

    // 与中介联系的方法
    public void contact(String msg) {
        mediator.contact(msg, this);
    }

    // 获取信息
    public void getMessage(String msg) {
        System.out.println("房主:" + name + ",获取到的信息是：" + msg);
    }

}
